package java8_28.oop.Javatest_2;


public class Delta extends Figure{
    private double a,b,c;//边
    private double area;

    public Delta(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;

    }

    @Override
    public double area() {
        double p=(a+b+c)/2;
        return Math.sqrt(p*(p-a)*(p-b)*(p-c));
    }
    @Override
    public double girth() {
        return (a+b+c);
    }

    @Override
    public void show() {
        System.out.println("这个三角形");
    }
}
